


Pandora's Box

by Chessanator



Series: The Promethean Trilogy [1]
Category: 999: Nine Hours Nine Persons Nine Doors - Fandom, Zero Escape (Video Games), Zero Escape: Virtue's Last Reward - Fandom
Genre: Badass, Badass Maths, Clover Cameo, Currently lacking industrial grade primes, Gen, Headcanon, If I tell you I'll have to shoot you, Post ZTD true end, RSA Encryption, SOIS, ZEcret Santa, Zecret Santa 2017, maths - Freeform, prime numbers
Language: English
Status: Completed
Published: 2017-12-22
Updated: 2017-12-22
Packaged: 2019-02-17 04:18:54
Rating: Teen And Up Audiences
Warnings: No Archive Warnings Apply
Chapters: 4
Words: 7,518
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/13068981
Author URL: https://archiveofourown.org/users/Chessanator/pseuds/Chessanator
Summary: When Alice brings her long-time friend Hazuki into SOIS to help with a tricky computer problem, she discovers that her mathematical talent may be far more significant than she had ever considered it. Using her new power, and working alongside Hazuki, they become capable of defeating threats to the country that could have eluded all of SOIS, protecting the world like they never have before.But when you tug at the foundations of the modern world, no matter how well-justified your intentions may be, you can never know what that hubris might bring.





	1. Fundamental Theorem of Arithmetic

**Author's Note:**

  * For [SiggyKlim](https://archiveofourown.org/gifts?recipient=SiggyKlim).



> Gift for SiggyKlim for ZEcret Santa. I hope you enjoy Alice and Hazuki being cool, and have a great Christmas.
> 
> Please excuse the smallness of my primes. Turns out I didn't have the access to 19 industrial grade primes I'd need to do this properly.

**25 th November, 2029**

Alice knew that, technically speaking, Hazuki Kashiwabara fell under the purview of the ‘If I tell you, I’ll have to shoot you’ Protocol. She also didn’t much care. After the Nonary Game she had been kidnapped for and with both her daughters working for the Special Office of Internal Security, Hazuki already knew most of everything worth knowing, and knew why it was important to keep it all secret. More importantly, Hazuki was actually a really useful lady to have around. You didn’t just find her sort of genius standing by the side of the road. So Alice didn’t much care for anyone saying she wasn’t allowed to invite her friend into the Office whenever she felt like.

Of course, when an officer of the SOIS doesn’t care for something, it doesn’t actually matter.

So, one blatantly forged ID badge later, Hazuki was comfortably situated in Alice’s office, swinging the swivel-chair by the computer gently around. Alice settled for lounging on the sofa opposite. One of the key tenets of SOIS operations was matching intelligence assets to the task they were best suited for, and despite the electronic warfare training all agents went through Alice could be confident that with Hazuki at the computer there was little more she could contribute.

“So how are Nona and Ennea doing these days?” Hazuki asked. After nearly losing her two daughters a decade before, that question was always her first when she and Alice met.

“Overseas, at the moment,” Alice replied. She followed it up with her usual thin smile that said, ‘and you don’t need to know anything more.’

“‘Overseas’? Really?” Hazuki scoffed, “Wasn’t this supposed to be the office of _internal_ security?”

Folding her arms and smirking, Alice said, “America’s internal security starts as far as possible from our borders. The earlier we catch the bastards, the safer we all are.”

“Yup, I guess so.” With that, Hazuki swung around in her chair, half way towards the keyboard. “So what’s up today, Alice? Who are we going to hack apart this time?”

Alice shrugged. “Maybe I just wanted to talk to an old friend.”

“You know, for a top secret agent of the most clandestine agency in the world, your lies are just awful. If you just wanted to chat, there are plenty of cafés around here where we could have met. About half of which are entirely staffed by patsies of yours, if you really needed to discuss something confidential.”

“That’s not true!” Alice exclaimed. She held her mock-outraged expression for a couple of seconds, then relaxed. “After Light quit his harpist job, we haven’t got any leverage on his replacement yet. That makes the number of cafés we control half-minus-one by my count, thank you.”

Hazuki chuckled lightly. Then, she continued, “Still, I know I’m right. We wouldn’t be meeting here if you didn’t need my skills. So tell me, Alice: what’s up?”

“Nothing world-ending,” Alice said, getting to the point, “Just this mafia group that’s resurfaced. The one that tried to take over the Las Vegas strip a couple of years back. We thought that we’d eradicated them back then, but it looks like we only managed to weed out all the stupid.” Annoyed as Alice was that the previous mission hadn’t been a complete success, it wasn’t a complete washout. At the very least, it had been a relatively safe proving ground for Light and Clover to win their spurs.

“Smart mafiosos? Rue the day.” Hazuki gestured avidly towards the computer she was sitting at and said, “Just general hacking disruption, then? Or are you after something in particular?”

Alice considered it. “We’d like to know where they are getting their money from. They couldn’t have recovered this fast without outside help.”

Hazuki grinned. “Can do.”

 

After five minutes of preparation, Hazuki was ready to go. Alice had done her part, aiming the computer at the closest thing the Office had to an entry-point to the gang’s computer network; now she could step back and just let Hazuki get to work. Hazuki cracked her knuckles and stretched out her back, ready to type.

Hazuki glanced at Alice.  
Alice nodded.  
The hacking began.

Green lines of code swept across the screen as Hazuki’s fingers swept across the keyboard. The screen flashed with one window full of data then another; Hazuki gave each only a moments glance, absorbing the information then dismissing the window in favour of the next. Each snippet of data informed the next piece of code, and without quite understanding what was going on Alice could feel them spiralling in and in towards their target. At the very least, Hazuki was grinning in anticipation.

And then the screen went blank.

“No!” Hazuki gasped. She slammed her hands onto the desk, rattling the keyboard.

Alice stared at the dark empty screen. “W-What happened?!”

“I was _this_ close,” Hazuki hissed. She tapped the left mouse button a couple of times, bring the last few windows of data and code back onto the screen. “Look here. This group has set up their network by using a regularly updating schedule of private and public cryptography keys for an RSA system. After random intervals each computer in the network chooses a new private key, constructs the new public key, and distributes it to all the other trusted computers on the network. I had just set up a buffer-overflow past their final layer of defences, and I was _this_ close to injecting code that would trick those computers into thinking we were part of the trusted network, when someone human noticed and scrubbed us out.”

Alice knew far more than the basics of computer security and infiltration, but even so she’d never heard of a cryptosystem complicated as that. “What’s with that? Surely that’s a bit excessive, especially compared to what this group had the last time we beat them.”

Hazuki let out a wry bitter chuckle, then said, “It’s probably worth it, if they knew we were after them. It was reasonably well-programmed, at least, and it had to have been the reason your in-house guys couldn’t break in. Even if you brought all your processing power to bear, you couldn’t break through. I found out that this was the public key just before we were kicked out –” Hazuki elegantly indicated a number – 599725548175349234588407 – at the bottom of the window she had restored “– but by the time you can get SOIS’ supercomputers into action to factorise it, they’ll have already moved onto another key.

“God help us. So even though we know it’s 599746013723 times 999 965876309, we still can’t…” Alice trailed off.

Hazuki sat there, frozen by complete disbelief.

Alice snapped her fingers in front of Hazuki’s face. “Hello? Hazuki Kashiwabara? Are you still with us?”

Hazuki murmured, “That’s… That’s not possible.”

“Thank god. I thought I was going to have to say that Seven had called you an old lady.”

Alice’s flippant comment went nowhere. Hazuki still stared at her, but her eyes showed none of the anger they should have. To be honest, Alice was rather concerned.

“Hazuki…? Lotus?”

“That’s completely impossible,” Hazuki said again. She turned back to the computer screen, furiously typed some code; she stopped and turned back to Alice only when another number had appeared on the screen. “Alice,” she said, concern filling her voice, “Can you look at this, please?”

Alice looked at the number: ‘724677698895304108732301’. “It’s 803065408993 times 902389382957,” she replied.

Hazuki pressed ‘enter’ on the keyboard; another number appeared. “And this?”

Alice didn’t need to study ‘668089868878852858021373’ for even a second. “769945710559 times 876710358947.”

Hazuki murmured again, “It’s completely impossible…” She tapped out a long string on the keyboard, then pressed enter again.

Alice stared at the number ‘90591875222471336864959701060623807145969394309’. “What the hell, Hazuki?”

“Thank goodness.” Hazuki sighed, her relief almost filling the room. “You can’t actually solve –”

“It’s obviously 324270473809 times 465783271379 times 599886421037 times 999836357587. Why are you wasting my time with simple things like this?”

“What the HELL?!”

 

Once Hazuki had recovered, she explained. “Alice… every single bit of computer security in the entire world depends on our inability to easily factorise primes. We can produce numbers in a couple of minutes that can’t be broken in centuries. Shouldn’t be broken in centuries. But you were doing it instantly.”

Alice shrugged. “I’ve told you. I’ve always been good at math.”

“I know. But this isn’t just ‘good-at-math’ good at math. This is ‘you could walk into any bank in the world and walk out with all their money’ good at math.” Hazuki paused, staring at Alice inquisitively. “Alice… Are you an esper?

“Huh?”

“I should have realised with Nona and Ennea,” Hazuki said, “I should have noticed the signs, when they started to get twice as good at school tests without needing to revise, and when one of them would know all the spoilers for a series that only the other had watched. If I’d noticed, maybe I could have protected them, or at least worked out why they had been taken. I decided that I would be more observant next time. So, Alice: are you an esper?”

Alice folded her arms sternly. “No. I’m not.”

At that moment, Clover leaned through the office door, her pink hair bouncing eagerly as swung on the doorframe. “Yep she is!”

“Clover!” Alice snapped.

“What? We’ve known all year: me, Light, all of us! Anyway, see you later!” Clover swung away and skipped down the corridor before Alice could reply.

Alice scowled, but she couldn’t avoid the truth. Everyone she’d demonstrated it to had been convinced that there was something extraordinary about her mathematical abilities. She hadn’t become a highly-ranked officer of SOIS by failing to look past her own biases. She took a deep breath and accepted the facts in front of her. “Interesting. I’m sure there’s some way the Office can use this.”

Hazuki nodded slightly. “You can break pretty much any encryption in the world. I’m sure your bosses will find something for you to do. But…” She trailed off, glaring at her computer screen. “Doesn’t help us much with this, though. The mafia group we were trying to hack were updating their keys too regularly. By the time I’ve given you one, you’ve factorised it, and I’ve hacked in, they’ll already have changed to another one. That’s for every single one of the 37 nodes of their network. And even if I do break through, the person who caught me last time will probably force me out again. If we could automate your ability, of course I could hack them. But…”

‘If we could automate your ability.’ Alice thought about those words, and a spark lit in her mind. She was still getting used to the idea of being an esper herself, but she was comfortably familiar with esper abilities as a concept and in practice. She had recruited Light and Clover, Nona and Ennea, and all the rest of the Nonary Game espers. She had trained them, seen them in action, carried them through their first missions. Mentoring those espers and making them useful to SOIS and the country had been the declared goal of the unit she led. But it hadn’t been the only goal.

“I think I have an idea.”


	2. Orbit-Stabiliser Theorem

Hazuki watched as the technicians clustered around the sofa where Alice lay, fiddling with wires and waving scanning devices. It didn’t look to Hazuki like the bustling activity was actually making any progress at all, but eventually the techs decided they had completed what they had set out to accomplish and backed off, letting Alice sit up. Hazuki looked Alice over.

“Well congratulations, Alice,” she drawled, “You’re winning first prize at the next cyberpunk convention you go to.”

Alice really would have won such a prize. If the metal casing that covered the right side of her head wasn’t enough, and the flashing lights that spun around the surface didn’t seal the deal, then the fact that the wires – which sprouted in a chaotic rainbow-coloured nest above the device – also appeared to bury their way into her head would have convinced anyone that she was a technologically-enhanced agent for a clandestine government conspiracy. Correctly, as it happens.

“I have to ask: what is…” Hazuki carefully pointed at the device, making sure that her finger didn’t get caught in the tangle of wires or touch anything important. “… that?”

Alice tilted her head, testing out the weight of the thing that had been attached to it. “SOIS has been working on this for quite a while now. In fact, we’ve been developing this for… two years, now.” Alice said that last part as suggestively as possible. She hadn’t said, ‘from the moment we recruited the survivors of the Nonary Games,’ but she might as well have. “Ever since we found out that the morphogenetic field existed and that there were espers who could use it, we knew we had to employ it to protect the nation. We recruited every esper brave enough to join us, of course, but we couldn’t just leave it to chance. I wouldn’t rest if we were just leaving it to chance. So from the beginning we’ve wanted to see if we can automate esper abilities. Working with the gentlemen down at Area 51 who were researching… well, it’s classified. But this…” Alice pointed – far too calmly – at the contraption that had been wired into her brain. “This is the prototype for the device we came up with.”

Hazuki had a horrifying flash of images go through her mind; Ennea having that device clamped onto her head and Nona having that device clamped onto her head and both of them being wired into machines to be extracted from. “That sounds far too similar to what Gentarou Hongou and his Cradle goons were trying to accomplish. You wanted to put my daughters in –”

“Please,” Alice interrupted, “We weren’t planning on forcing anyone into it. Just like when Nona and Ennea joined us in the first place, it would have been entirely their choice. If we couldn’t have tested this with willing volunteers, it wouldn’t have been worth it at all.” Alice paused. “I’m rather glad I’m the one who is testing the prototype out. We hadn’t used it yet because we were concerned about the possibility of it affecting both siblings through their connection. If I’m not an esper, it shouldn’t cause me any harm, If I really am… I’ll have to learn maths from the ground up again. Probably.”

Hazuki could at least respect that her friend was willing to put own life on the line before involving anyone else. “Yup. Anyway, what are we supposed to do with this?”

“It should be wirelessly connected to that computer,” Alice explained, “You send me numbers; I’ll factorise them and send them back to you. If it works the way I imagine it will then I won’t even need to consciously think about it: it’ll just happen.”

Alice seemed perfectly comfortable having that device connected to her brain, and Hazuki trusted her friend to weigh up the benefits and risks and make the best choice. If so, then they were ready to begin. Hazuki sat down at the computer and began her usual pre-programming stretches, loosening her muscles and getting a feel for where the keyboard lay in front of her. Once her back muscles were fully exercised and supple she was ready to go.

“Let’s kick some ass.”

 

It really was too good to be true. In fact, it was a hacker’s dream in digital form. Hazuki barely had to do anything at all once the original program was written. The code just did the work for her. As the attack encountered each obstacle, Alice would hum to herself and numbers would fly across the screen as the encryption key was factorised to shreds. At one point the enemy sysadmin caught her like before and reformatted one hacked computer. Then another. Then a third. It didn’t matter. Hazuki had complete control over every other computer on the network, and the freed computers were reinfected with malware faster than Hazuki could blink. Overwhelmed, the enemy gave up.

Nothing could stop her.

With the hack successful, it was time to make use of the access she had. Hazuki started by scouring the databases for every picture of gang members she could find, downloading them to the SOIS servers. That would help the police find and arrest every last one of the bastards. She looked up information about the routes they used to smuggle in drugs and victims, and plotted them as best she could on a map. Then, with the obvious stuff done, Hazuki went further.

A politician who the mafia had been blackmailing: his details and proof were anonymously slipped to a local newspaper. Irregularities in the accounts of the casino the gang had laundered money through highlighted and sent to the IRS. Emails to two hit-squads edited to direct them away from their at-least-probably-more-innocent targets and at each other’s hideouts. With her all-encompassing presence on their computers, Hazuki could do to them whatever she wanted.

Finally, because it was what Alice had originally asked her to find, Hazuki went for the money. She didn’t know anything about how criminal syndicates organised their cashflow; her career before she had met Alice had only been at boringly respectable companies. But looking at it from the position she occupied, it was clear as day. One by one, the accounts were drained, frozen, and involuntarily donated to missing-children charities. After five minutes, the only trace left of all the gang’s crime-earned cash was the database of transactions that Hazuki had downloaded.

Hazuki pressed escape. The attack program ended, closing every window but the one that showed the financial documents.

“Bullseye!” Hazuki called across the room, “Alice, I did it! We won’t see those bastards anytime soon.”

When Hazuki glanced round, Alice was tapping the esper device bemusedly. “Really? It hardly felt like anything was happening on my end. Hmm… I guess they were telling the truth when they told us this was safe.”

“I guess they were,” Hazuki replied. She paused. “Still, test it out one someone else before giving my daughters one. I’m sure Clover would be an eager guinea-pig.”

“Yup!” Clover had stuck her head through the door again as she skipped back down the corridor. She stared at the protruding web of wires coming from Alice’s head. “Woah, that looks awesome! Is this the new SOIS thing? Tell me when I get mine!” Before Alice or Hazuki could give Clover a reply – sensible or otherwise – Clover had skipped away again.

Alice shrugged elegantly. “I guess so.” She stretched, then stood up from the sofa she had been resting on while the hack was in progress and walked over to Hazuki, reading the screen over her shoulder. “Those are the accounts of all those criminals' money, then? Did you manage to find out who was funding them?”

As far as Hazuki was concerned – and she knew that Alice felt the same way – accounting was the job of people who went to work in suits, not those who could wear whatever they damn well pleased. But there were some simple macros she could set to work that might just do the job for her. She started one, searching for any name that appeared too often in the list of transactions she had taken.

To her surprise, it worked. One single name, belonging to one single organisation, appeared in the list ten times as often as anything that wasn’t one of the mafia’s own accounts. Practically every single cent the mafia had owned had at some point in its life passed through the wallet of this one particular company.

“Alice,” Hazuki murmured, “Have you ever heard of a company called _Epsilon Derivatives Ltd_?”

Alice frowned. “No. I’ve never heard of it. But… Something about the way it sounds famil–”

Before Alice could finish, every single klaxon in the SOIS building went off at once.

 

“Alert! Electronic warfare attack in progress! Electronic warfare attack in progress! Turn off all non-necessary computerised equipment until an all-clear announcement is made. Electronic warfare attack in progress!”

“No.” Alice’s voice came out as a slight determined hiss.

Hazuki didn’t need to be told once. “I’ll see what I can do.” Drawing in more of the SOIS processing and network resources than she was technically supposed to have access to, Hazuki started to explore how the attack was targeting SOIS. It was easy enough: she quickly found some malicious code that had been injected into an obscure section of the operating system. Weirdly, it would have activated the fire-prevention sprinklers the next time Light Field used his voice-controlled computer. Hazuki quickly removed it; she didn’t want to get wet.

Then she noticed another thing: pieces of malware and viruses and trojans being inserted into files across the parts of the system Hazuki could access. She scoured out each one she could directly alter, directed the antiviruses towards the ones she couldn’t, and then came back to find even more malware in the spaces she had previously cleared.

Something about the whole thing seemed disturbingly familiar.

Defending mindlessly wasn’t going to be enough. Hazuki left the antiviruses to search for malware as best they could and turned her attention to the channel of incoming attacks. The attacker was redirecting their attacks via thousands of decoy computers around the entire internet and Hazuki couldn’t work out where the attack was originating from. But it was all arriving at the same place, and Hazuki was able to intercept some of the incoming packets as they streamed. She read them.

Lines of obviously malicious code, all cryptographically signed as though it had come from inside SOIS, each one naïvely accepted by the system because of that forged verification.

Hazuki hoped that the fact that she had just used the same technique herself wasn’t the only reason she worked it out so quickly. Someone with her skills and experience should have been able to puzzle it out even from scratch. That was all academic, though; SOIS encryption had been broken, the attack was underway, and Hazuki had to get that information out as quickly and as clearly as possible.

“Alice! They’ve broken our encryption!” she called out. After a pause, she added, “Just like we did.”

“How many of our keys have been broken?” Alice asked.

Hazuki glanced at the incoming packets of malware again. One said it had come from the head of SOIS’ research department, another claimed to have come from the Vice-President, a third one had been forged to appear as if Alice herself had authorised it.

“All of them.”

Alice stayed stoic; her voice stayed level and controlled. “Their target will be the top-secret information we have stored in the databases here. Our resources, our current missions, our agents’ identities.” Nona’s and Ennea’s faces flashed before Hazuki’s eyes as Alice said that. Alice continued, “What’s our defence?”

There was no defence. “We have to unplug everything,” Hazuki replied, “Literally everything. I’d tell you what to prioritise, but if I knew what the most important things were you’d probably have to shoot me. Just… Just rip the cables out of the servers if you have to. It’s the only way.”

Alice nodded. “Okay. Stay here.” Alice darted for the door of the office, stopping only to turn and slide a small earpiece across the desk towards Hazuki. “I’m heading to the server room. Do the best you can to delay, and contact me if anything changes up here.” Then, Alice was gone.

Hazuki focused all her attention back on the computer screen. Delay. That was what she had to do. She couldn’t defend, but if she programmed as hard and as smart as she ever had before, she might just be able to slow the enemy down.

As the attacker extended their control over the SOIS network Hazuki followed, watching where their attention was directed. Alice knew what she was talking about: the databases had to be the target. Hazuki made use of that, laying false trails and setting up decoys that would appear to be the main database up until the moment they were accessed. After the first two decoys were found and quickly left behind, Hazuki filled the third with false information, constructing profiles of non-existent agents from photos of celebrities and fictitious mission reports from the most ludicrous of Alice’s bar tales.

The attacker paused there for two and a half extra seconds.

The decoy tactics had been spent. From there, the attacker headed almost directly for the true database. Hazuki threw her last-ditch attempt into the ring, obfuscating the directory pathway by breaking every last rule of data-retrieval good practice in the books. That bought maybe one more second.

The attacker reached the database.

Hazuki’s computer monitor went black. The alarms suddenly stopped. Silence fell across the office. Hazuki held her breath, not knowing what the result had been.

 

The silence was broken by a tinny voice coming through the earpiece on the table. Hazuki desperately scrabbled it up and clamped it to her ear. “Hello?” Hazuki asked into it. She realised at this point that Alice had never taught her about radio protocol.

Fortunately, it was Alice speaking. “Hazuki? What’s happening? How far did the opposition penetrate? Did they find anything that could compromise us?”

“I have no idea. They’d just reached the database when everything went down…”

“If it went down just now, then it was when I disconnected the rest of the servers.”

Hazuki sighed with relief.

“Hazuki. Give me your professional judgment,” Alice continued, “about how much damage has been done. Could they have extracted any sensitive information?”

Hazuki considered. She was sure that a data-dump of the system’s process history would reveal that the enemy hacker had accessed the main database. She was also sure that it had only been for a couple of milliseconds. After watching the enemy smash through every electronic defence SOIS had, it would be all too easy to ascribe an almost-infinite amount of power and ability to them. But that could only lead to paranoia. No-one human could have understood anything from the database in that miniscule amount of time. Hazuki replied. “They couldn’t. You stopped them just in time.”

“Good.” Alice paused, and the silence crackled through the radio. “There’s a lot of details for the higher-ups to sort out here… and they will want to assign blame. If it comes to a tribunal, I’ll vouch for you. You did more to protect us than anyone in our own department. If it was up to me, you’d get a medal, but… somehow I don’t think they’ll be thinking about that.” Another pause, another crackle. “Wait there. I’ll sort things out as best I can and get back to you.” The earpiece fell silent.

Hazuki slunk back into her seat. So that was it? The bad guys hadn’t broken anything too much, so all was good? No. Hazuki couldn’t just sit there passively.

She leaned back towards the computer. Without the full infrastructure of the SOIS computer system behind her she wouldn’t have a connection quite as versatile as the one she had before: a great shame. But without it she was blind, and even after she has reworked the SOIS network protocol to allow her further access it shouldn’t allow the enemy hackers any more chances to attack the SOIS system.

Besides, she was curious.

Even through the very limited connection she could muster, Hazuki could at least do something. Since she and the computer she was sitting at had been key in the defence of the SOIS network, some details of the attack were stored on the computer’s own memory rather than anywhere else. Hazuki looked up the proxy computers the attackers had used. She wasn’t going to actually hack them, of course: most of them were personal computers of innocent, if annoyingly stupid, people who had managed to allow malware in that turned them into parts of the botnet. But she could follow the signal traffic.

For a few minutes, the traffic statistics were pretty typical, for normal computer-illiterate users. But then the computers were driven into action once again. Their processing power wasn’t being aimed at SOIS this time. Instead, all the internet traffic was being sent to another target. Though that target shouldn’t have had security and encryption in anyway correlated with that of SOIS, the attacker began to break it apart after only a short pause.

For some reason, that address of the new target looked worryingly familiar. Hazuki looked it up its address from the information SOIS had available.

That IP address was labelled only by a single symbol: a bright yellow circle, with three symmetrical protruding wedges.

Hazuki grasped the earpiece, yelling into it in a panic. “Alice! Alice! They’re going–”


	3. Intermediate Value Theorem

**_5 minutes earlier…_ **

Alice paused, considering the question Hazuki had just asked, as she finished off her masterful hack. " _Epsilon Derivatives Ltd..._? No. I’ve never heard of it. But… Something about the way it sounds famil–” Alice never got to answer.

“Alert! Electronic warfare attack in progress! Electronic warfare attack in progress! Turn off all non-necessary computerised equipment until an all-clear announcement is made. Electronic warfare attack in progress!”

“No…” Alice almost couldn’t believe it. No-one had been brave or reckless or stupid enough to try to hack SOIS since computers had been invented. Still, drills had been prepared for this. First step: consult the experts.

‘Experts’ had officially meant the slowpokes down in IT in those drills, but Alice had an actual computer expert on-hand.

“They’ve broken our encryption! Just like we did!” Hazuki announced. She was already busy at work managing the attack, so Alice just asked the one most important question.

“How many of our keys have been broken?”

“All of them.”

With a co-ordinated all-out attack on SOIS like this, there was only one place the attackers could be going: the main database. Almost everything that America had declared officially Top-Secret, as well as everything that had been kept actually top-secret by not officially being declared so, was kept there. Alice explained it.

“We have to unplug everything,” Hazuki replied, “Literally everything. I’d tell you what to prioritise, but if I knew what the most important things were you’d probably have to shoot me. Just… Just rip the cables out of the servers if you have to. It’s the only way.”

Alice leapt towards the door. She stopped only to slide a radio earpiece along the desk to Hazuki, and then she was off.

 

The server room was three floors down from Alice’s office. Alice vaulted over the railing in the stairwell to drop the first level, but stumbled as she landed. Alice had lied somewhat to Hazuki when she had claimed to have hardly felt anything from the hacking esper device still attached to her head. Really, she had been given a throbbing headache, and it was only getting worse as she went along. If Alice wanted to ensure she reached the server room at all, she’d have to accept taking a longer time and go down the stairs normally.

Later than she would have hoped, and perhaps later than she could afford, Alice arrived at the server room. She stared at the banks of servers that ran all the way along the walls, further than Alice could see through the dimmed lights. These were what the attacker had come to steal from. These were what she had to protect.

Alice couldn’t tell which servers could access the most sensitive blocks of data just by looking at them; through the knotted forest of cables that connected them she could barely tell the different servers apart. It didn’t matter. She had to disconnect everything, and deciding where to start would waste more time than it was worth.

She started pulling out the cables from their sockets, yanking out several at a time, as many as she could grasp at once. It was too slow.

She pulled out her combat knife from her holster and switched to slicing through the wires with its brilliantly sharp edge. It was much faster than just pulling them out. It was still too slow.

Alice took a gamble. There had to be someway of disconnecting everything at once, for precisely this situation. Turning her attention away from the servers right in front of her, she sprinted down the room searching for some sort of master switch.

As Alice ran, her headache grew and grew. With her training, it was easy to force herself to ignore it. Her own personal comfort could come later, after the Office was safe. She continued to run.

Someone less alert would have missed it, or over-shot. The master switch had been buried between the servers, so that you couldn’t even see its alcove from the aisle. But Alice noticed the break in the pattern, skidded to a halt, and dived her hands in.

Alice yanked down the lever.

The lights in the server room went out completely.

The alarm died.

Alice couldn’t rest yet. She was completely in the dark – literally and figuratively – about whether she had been in time… or not. That needed to be rectified. Alice spoke into her earpiece, contacting the one she’d left for Hazuki. “Hazuki. Sit-rep?” Alice asked.

There were a few moments of silence before Hazuki replied. “Alice?”

Of course. Hazuki didn’t know what ‘sit-rep’ meant. “What’s happening? How far did the opposition penetrate? Did they find anything that could compromise us?” Alice asked, more explicitly.

“I have no idea. They’d just reached the database when everything went down…”

“If it went down just now, then it was when I disconnected the rest of the servers.” From Hazuki’s description, it had been close: very close. There was nothing on any of the servers that Alice could see that would indicate whether or not they had been accessed. Of course, they were all entirely dormant. So Alice had to ask. “Hazuki. Give me your professional judgment about how much damage has been done. Could they have extracted any sensitive information?”

Silence. Then, finally, an answer. “They couldn’t. You stopped them just in time.”

 

Alice slumped back against the rack of servers opposite the master switch. She had the answer she needed; she had succeeded. Now, the aftermath.

She could, at least, focus her entire mind on considering that aftermath. Her headache, which had reached its thumping migraine-like zenith as she’d found the master switch, had begun to quickly subside as she relaxed.  That left room to think about the important questions.

Like the most important question of all: how had the enemy hacked SOIS with such insulting ease? Had someone been turned, blackmailed, or persuaded into giving up the encryption keys? Or merely been sloppy, and exposed them by accident? Either way, the result for that person would be the same. They’d told someone they shouldn’t had, and the consequences had been dire, and Alice or whichever of the other fully-trusted agents found them first would have to shoot them.

But what if that hadn’t been the scenario? What if…? What if…? Considering all the various possibilities was starting to bring Alice’s migraine back with a vengeance.

Alice’s radio earpiece crackled, the sound almost painful with how sensitive Alice’s headache had made her. Then Hazuki’s voice yelled desperately from it, adding worry and concern to the purely physical pain. “Alice! Alice!”

“Hazuki,” Alice said, trying her well-honed best to not show any weakness, “What is it?”

Hazuki’s reply chilled Alice to the point where she would show weakness whether she wanted to or not.

“They’re going for the nuclear codes!”

The nuclear codes. The ability, for good or more likely ill, to control and launch America’s entire nuclear arsenal. That was what the enemy was seeking. If they succeeded… everything was over.

“How are the defences holding up?” Alice asked.

“They aren’t!” came Hazuki’s tinny reply, “They’re breaking through the encryption as quickly as they did ours. I hate to say this, but there’s no way they’re doing this without the same ability to factorise primes that we were using.”

‘The same ability to factorise primes’? Alice could recognise something that very definitely wasn’t a coincidence when it was right in front of her. A resurfacing nuisance funded by a single shady source? An encryption system that practically required automatic prime-factorisation to break? A widespread co-ordinated attack on SOIS and then the nuclear infrastructure immediately after? This had been planned.

The hacking esper device must have been compromised. That was the only conclusion.

Alice tried to wrench the device from her head. That failed; it had been clamped on perfectly. She changed tack, returning her combat knife to her hand – she ignored the way her hand tremored with feelings of déjà vu – and raised it towards the side of her head. She prised the device up as far as it would go. With a single motion, she sliced through all the wires that went into her head.

Blinding pain ran into her brain. The device fell away from her, but she could barely see it; she couldn’t hear it at all as it clattered on the floor. It was a miracle that she stayed standing, and conscious.

The pain was worth it, though. Without the device, the enemy’s attack wouldn’t be able to continue.

Alice almost heard something coming through her earpiece. Hazuki? She sounded concerned about… something. Alice couldn’t hear what, and couldn’t pay attention to it, anyway. The headache consumed her mind. It wasn’t the pain from violently removing the device, though that was still there. It was the same headache as before. The very same headache that had formed when she and Hazuki had first tried using Alice’s new-found esper abilities. Through that headache, and from that headache, Alice realised.

It wasn’t the esper device that the enemy had targeted, though that had tried to make it appear that way to anyone who noticed the first layer of their scheme. It was Alice herself. That was their true trap.

Alice couldn’t stop this just by removing some equipment. She raced out of the server room and stumbled in the direction of the medical bay. Now that she had learned what to focus on, she could see the prime numbers flying through her mind: 324143286479 and 803205935663 and 867527277251 and 902450929507 and 599770933939 and 465836618921 and 324330453487 and 999999999899 and 770009701301 and… Alice knew that these numbers were her side’s numbers, but she couldn’t help but factorise them anyway.

She’d never been so violated: not even the year before when she and Clover had been captured and then unceremoniously released because they were no longer needed. How the hell were those bastards doing this to her? Subverting a piece of hardware like the device that she had used was worrying, given that SOIS security should have prevented it, but at least she understood how that could happen.

A phrase rose out of Alice’s recollection, from something she had read in a speculative report. The veracity and trustworthiness of that intelligence had been considered incredibly dubious at the time, but it had been as good as information got about Alice’s greatest and most hated enemy. So when the phrase ‘Mind Hack’ returned to her mind, she gave it more credence this time around.

God, no. _Fuck_ no! Alice wasn’t going to let Brother and Free the Soul and their damn Myrmidons do whatever they liked with her mind. Alice might have fallen into the trap they had set by funding the mafia, and she might have taken until then to unravel it, but it would end right there.

Alice burst into the medical bay. She found the stocks of Soporil Beta quickly. No need to measure out the dose: with Alice’s resistance it would need to be the entire vial or nothing. She slotted it into the injection gun.

The one thing that Brother needed to complete his plan and take control of the country’s nukes was Alice’s esper abilities. The one thing Alice could take from him was her own consciousness. Alice gladly took the injection gun and shot it into her own leg.

Blackness descended over Alice’s sight, but she could taste her victory. It tasted… bittersweet.


	4. A Shor Fine Day

**25 th December, 2029**

Hazuki made sure that she was there when Alice was allowed to return to the land of the conscious. She’d learned over the past month that if you were bold enough and unique enough, SOIS employees just accepted that you were supposed to be there. And when looking like the perfect model of a SOIS agent wasn’t enough, the still-technically-fake ID card that Alice had given her was.

Alice still lay on the bed. Thick, many-times wrapped bandages replaced the device in covering her head. Just cutting the device out like that had been utterly ridiculous, and they said that it was a miracle that Alice had survived it. But Hazuki’s friend was tough to the core, so Hazuki hadn’t been entirely surprised when the doctors had told her that not only was Alice still alive but she hadn’t even suffered any brain damage.

Those doctors now crowded around, examining the monitor of her brain activity and the IV line that dripped in more Soporil, second by second. That was just like every other time Hazuki had visited. But this time the anaesthetist began to fiddle with the intake, preparing to reduce the level and gradually wake Alice up. Holding up the value on the IV line, she glanced at Hazuki expectantly.

Hazuki took her position: a computer that had been set up in the medical bay specifically for this moment. This wasn’t anything like the jury-rigged construction Hazuki had used after the main servers had gone down during the attack on that day. This computer had been tailor-made, completely separate from the main SOIS network – which would be deactivated again, in any case, until they knew it was safe – containing an excessive armament of malware to aim at anyone who decided to make it a target, and with its own hard shut-down switch in case it was hacked.

Hazuki returned the anaesthetist’s glance, and nodded.

The IV slowed, dripped, dripped, dripped, and then stopped. Alice began to stir, her eyelids flickering and her breathing growing stronger. The head doctor leaned over, checking her vital signs.

Alice’s eyes snapped open. She reached up and twisted the doctor’s hand away from her, sitting up in one smooth motion. “Where am I?!” she demanded to know. Before she could be given an answer she looked around the room, her head and eyes moving in measured precise jolts. “Not our radiation shelter,” she muttered, “And you don’t look like you’re all cultists. So I guess the world hasn’t ended; thank goodness.”

“It hadn’t ended last time I checked,” Hazuki said, “I can look again, if you want.”

“Hazuki!” Alice gasped, before regaining her composure. She stared at Hazuki’s computer, a slight frown of concern forming. “Is it safe for me to be conscious? Is there any chance of the Myrmidons trying to use my abilities to break encryption again?”

Hazuki checked the monitor of her computer. None of the decoy computers that hackers had used previously had activated, and more importantly there was no suspicious extra traffic at either SOIS or the nuclear codes or anywhere else that SOIS considered sensitive.

“I don’t think so,” Hazuki replied. She paused, appreciated the sceptical look on Alice’s face, then explained, “It must have taken them all year to assemble the botnet and the processing power they needed to attempt this. When we did, we were able to track down all the computers they had infected and get them cleaned out. Plus, when they got desperate and overextended themselves…” Hazuki swivelled the monitor to show Alice a particularly pleasant video she had saved. On screen, Ennea, Nona, Clover and Light escorted a half-dozen handcuffed blonde-haired identical complete monsters into SOIS’ cells. “The Myrmidons had one shot at this. Thanks to you, that one shot failed.”

“Good,” Alice stated. Now more relaxed she looked around the medbay again, this time noticing the lines of tinsel that lined the walls, far enough away from anything that needed to be kept sterile. “So, already Christmas? What present did you get for me?”

“It’s a secret. If I told you, I’d have to shoot you.” Hazuki laughed.

Alice scowled. “So it’s not Brother’s head on a platter? With extra salt, for his wounds? No?” Alice leapt out of her bed. She stumbled slightly, testing muscles that hadn’t been exercised for a month. But then she was standing tall and proud, just as Hazuki had always known her, before striding towards the door. “I guess we’d better get started, then! Come on, Hazuki. Let’s kick some ass.”

Hazuki carefully shut down her computer, then stood up. It had been a long dread-filled month, but she could still smile.

“That’s right, Alice. Let’s kick some ass.”

**Notes for the Chapter:**

> I should probably explain some of the maths behind this story, and the headcanon behind it. It all basically stems from my (slight) annoyance at the way the cipher-breaking at the end of Alice's route was handled. I mean, I get that it had to be something that was graspable for actual players of the game, but the whole thing is serious out of whack as actual encryption.
> 
> The form of encryption that this story is based around is called RSA encryption (There are many other schemes, which I swept under the rug for a cleaner story. Let's assume Alice would be as powerful against any of them as she was at Prime Factorisation) which is based around modular arithmetic for some large number n, usually chosen as the product of two primes. You treat a message as a number and take a power of it, multiplying it by itself many times. The encryption comes in when the powers reach that number n; it loops back round to zero, removing any chance of just guessing what the original number based on the size of the power.
> 
> Now, the key mathematical part is here. Since there are effectively only finitely many numbers here (anything bigger than n gets lopped round to a number smaller than n) taking powers of a number can't go on forever. It has to repeat at some point. For 'most' numbers (those coprime to n) that repetition goes through the number 1. And we can work out when that will happen, whatever the original number was, using a particular formula (appropriately enough, usually represented by the letter phi) that counts the amount of numbers less than n that are coprime. For numbers as large as the ones I've used in this fic, and especially the sorts of numbers used in the real world, counting that amount takes a prohibitively long amount of time.
> 
> But for a product of two primes, it's easy. Easy, that is, as long as you know the primes.
> 
> So that's the system. Pick two primes (you have to be careful here, but there are easy ways to avoid many flawed picks), multiply them together to get n, and use the primes to calculate phi(n). Then decide what power d everyone should take their messages for you to, and use the fact that you know phi to find another power e that will reverse it. Tell everyone d and n - that's your public key - and keep e and phi(n) secret - that's your private key. No-one can work out your private key without finding phi(n), and they can't do that without factorising n. In the real world, your encryption is safe.
> 
> All of that falls apart as soon as someone like Alice comes along.
> 
> In the real world, we don't have to deal with people like Alice, but we may soon have to deal with quantum computers. Given full quantum computing, an algorithm for easily factorising primes has been devised: Shor's algorithm. Luckily, we're still miles away from actual quantum computers that can actually implement Shor's algorithm. Still, it's the sort of thing which keeps a lot of mathematicians, computer scientists and other info-security folk awake at night.
> 
> Anyway, here's where my headcanon comes in. ZE esper abilities are pretty much described using vaguely quantum stuff. Meanwhile, a possible way of factorising primes at will has been described using very specific quantum stuff. Makes you think, doesn't it?
> 
> (There are a few places in the fic where I mention 'signing' something. What's going on here is the situation where someone encrypts something using their own private key. That sounds pointless, because everyone in the world can decrypt it using the public key. But because decrypting it with the public key gives a coherent message, it proves the message must have been originally encrypted by the private key, which only the owner should know. They've effectively 'signed' the message, proving that it's theirs.)
> 
> Does this lecture count as an extra present for you all? I hope it does... Merry Christmas!


End file.
